To begin, let’s explore the function we created to run all of this statistical analysis:
mysubsetMDS <- function(x){
mysubset <- df %>%
select(starts_with(x))
meta <- metaMDS(mysubset)
MDS_df <- data.frame(MDS1=meta$points[,1],MDS2=meta$points[,2]) %>%
cbind(demo)
return(MDS_df)
}
In English, this function allows us to run the MDS according to each subset of demographic and each subset of question type that we want. Obviously, in this page, we are exploring Ethnicity.
Let’s explore the science identity subset of questions first. Running our function we created and plotting it, we are left with this image of the plot:
This is great and all, but let’s run an adonis test to see if there is a significant difference in how different ethnicity goals responded to science identity questions:
##
## Call:
## adonis(formula = si ~ demo$ethnicity)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$ethnicity 9 0.3197 0.035524 1.1163 0.0322 0.352
## Residuals 302 9.6102 0.031822 0.9678
## Total 311 9.9299 1.0000
This shows that the differences in answers are not significant, according to ethnicity.
Next, let’s look into Carer Motivation:
And an Adonis test:
##
## Call:
## adonis(formula = cm ~ demo$ethnicity)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$ethnicity 9 1.9146 0.212738 4.616 0.12093 0.001 ***
## Residuals 302 13.9182 0.046087 0.87907
## Total 311 15.8329 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Look at that! The differences are significant for Career Motivation across ethnicity.
Now, Intrinsic Motivation:
And an Adonis test:
##
## Call:
## adonis(formula = im ~ demo$ethnicity)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$ethnicity 9 1.0516 0.116849 4.5473 0.11934 0.001 ***
## Residuals 302 7.7602 0.025696 0.88066
## Total 311 8.8119 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Look at that! The differences are significant for Intrinsic Motivation across ethnicity.
Now, Self-Determination:
And an Adonis test:
##
## Call:
## adonis(formula = sd ~ demo$ethnicity)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$ethnicity 9 0.9636 0.107065 4.8598 0.12651 0.001 ***
## Residuals 302 6.6533 0.022031 0.87349
## Total 311 7.6168 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Look at that! The differences are significant for Self-Determination across ethnicity.